#!/usr/bin/env python
# _*_coding:utf-8_*_

"""

@Time : 2022/2/20 22:52
@Author: RunAtWorld
@File: using_list.py
"""


def test_pop_all():
    arr = [0, 3, 5, 4, 6, 2, 6, 3, 8, 7]
    for e in arr:
        if e % 2 == 0:
            print(e, end=',')
            # arr.pop(arr.index(e))
            arr.remove(e)
    print(arr)

    arr = [0, 3, 5, 4, 6, 2, 6, 3, 8, 7]
    for e in arr[:]:
        if e % 2 == 0:
            print(e, end=',')
            arr.pop(arr.index(e))
            # arr.remove(e)
    print(arr)

    arr = [0, 3, 5, 4, 6, 2, 6, 3, 8, 7]
    for i in range(len(arr)):
        print(arr[0], end=',')
        arr.pop(0)


if __name__ == '__main__':
    test_pop_all()
